<?php
namespace App\Services\Core\Store\Baixing;

/**
 * 百姓网参数策略
 * Class BaixingConfig
 * @package App\Services\Core\Store\Baixing
 */
class BaixingStrategy
{

    /**
     * 获取传参定义的贷款金额区间号
     * @param $money
     * @return int
     */
    public static function getLoanAmountNum($money)
    {
        if($money >0 && $money <= 1) return 0;
        if($money >1 && $money <= 3) return 2;
        if($money >3 && $money <= 5) return 4;
        if($money >5 && $money <= 10) return 5;
        if($money >10 && $money <= 100) return 9;
    }


    /**
     * 获取传参职业定义
     * @param $profession
     * @return int
     */
    public static function getProfessionNum($profession)
    {
        switch ($profession)
        {
            case 0:
                $num =2;
                break;
            case 1:
                $num =0;
                break;
            case 2:
                $num =5;
                break;
            case 3:
                $num =1;
                break;
        }
        return $num;
    }



}